package com.maple.p2pclient.ui;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.maple.p2pclient.R;
import com.maple.p2pclient.p2m.P2MAppActivity;
import com.maple.p2pclient.p2m.P2MCameraActivity;
import com.maple.p2pclient.p2p.P2PAppActivity;
import com.maple.p2pclient.p2p.P2PCameraActivity;
import com.maple.p2pclient.p2s.P2SAppActivity;
import com.maple.p2pclient.p2s.P2SCameraActivity;
import com.maple.p2pclient.qr.QRCodeActivity;

import androidx.appcompat.app.AppCompatActivity;

public class HomeActivity extends AppCompatActivity {

    private Button btnP2PCamera,btnP2PApp,btnP2MCamera,btnP2MApp,btnP2SCamera,btnP2SApp;
    private Button btnQR;

    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        btnP2PCamera = findViewById(R.id.btn_p2p_camera);
        btnP2PApp = findViewById(R.id.btn_p2p_app);
        btnP2MCamera = findViewById(R.id.btn_p2m_camera);
        btnP2MApp = findViewById(R.id.btn_p2m_app);
        btnP2SCamera = findViewById(R.id.btn_p2s_camera);
        btnP2SApp = findViewById(R.id.btn_p2s_app);

        btnQR = findViewById(R.id.btn_qr);
        btnP2PCamera.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(HomeActivity.this, P2PCameraActivity.class));

            }
        });
        btnP2PApp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(HomeActivity.this, P2PAppActivity.class));
            }
        });
        btnP2MCamera.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(HomeActivity.this, P2MCameraActivity.class));
            }
        });
        btnP2MApp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(HomeActivity.this, P2MAppActivity.class));
            }
        });
        btnP2SCamera.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(HomeActivity.this, P2SCameraActivity.class));
            }
        });
        btnP2SApp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(HomeActivity.this, P2SAppActivity.class));
            }
        });
        btnQR.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(HomeActivity.this, QRCodeActivity.class));
            }
        });
    }
}